﻿using System;
using System.Windows.Forms;
using VideoClub.Business.Consultas;

namespace VideoClub.UI.Reportes
{
    public partial class FrmReporte4 : Form
    {
        public FrmReporte4()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int desdeA = 0, hastaA = 0;
            String apellidoDir = "";

            if (txtApellidoDir.Text == "")
                apellidoDir = "";
            else
            {
                apellidoDir = "%" + txtApellidoDir.Text + "%";
            }

            if (txtdesdeA.Text == "")
                desdeA = 0;
            else
            {
                desdeA = Convert.ToInt32(txtdesdeA.Text);
            }

            if (txtHastaAn.Text == "")
                hastaA = 0;
            else
            {
                hastaA = Convert.ToInt32(txtHastaAn.Text);
            }

            dgvConsulta4.DataSource = ConsultasBO.ObtenerTodosLosDatosConsulta4(desdeA, hastaA, apellidoDir);
        }



    }
}
